#include <iostream>
#include "httplib.h"

using namespace std;

namespace {

void Handle() {

// HTTP
httplib::Client cli("http://zhoubx.com");

auto res = cli.Get("/data");
std::cout << "status: " << res->status << std::endl;

cli.set_follow_location(true);

res = cli.Get("/data");
std::cout << "status: " << res->status << "\nbody: " << res->body << std::endl;

}

}

void HandleHttp() {
    Handle();
}
